import request from '../utils/request';

const baseUrl = 'http://127.0.0.1:7001';

export const generatePdf = async (url: string): Promise<string> => {
  const res: any = await request.post(`${baseUrl}/savePdf`, { data: { url } });
  return res?.data;
};

export const saveSheet = async (data): Promise<string> => {
  const res: any = await request.post(`${baseUrl}/saveSheet`, { data });
  return res;
};

export const getSheetDetail = async (id): Promise<string> => {
  const res: any = await request.post(`${baseUrl}/getSheetDetail`, { data: { id } });
  return res;
};
